package com.ss.android.article.base.feature.search;

import android.view.View;
import android.view.animation.DecelerateInterpolator;
import com.bytedance.common.utility.UIUtils;
import com.ss.android.article.base.app.AppData;

final class s implements Runnable {
    private final r a;

    s(r arg1) {
        this.a = arg1;

    }

    public final void run() {
        long v8 = 100;
        float v6 = 50f;
        float v5 = 1f;
        if("detail".equals(this.a.s)) {
            this.a.p.setTranslationX(UIUtils.dp2px(this.a.a, v6));
            this.a.p.setAlpha(0f);
            this.a.p.animate().translationX(0f).alpha(v5).setDuration(200).setInterpolator(new DecelerateInterpolator()).setStartDelay(v8).start();
        }

        if((android.support.design.a.isTextEmpty(this.a.l)) && (android.support.design.a.isTextEmpty(this.a.g))) {
            int v0 = !this.a.o() ? 1 : 0;
            if(this.a.c != null && v0 != 0) {
                String v0_1 = this.a.c.getText().toString();
                int v1 = this.a.c.getSelectionStart();
                this.a.c.setText(((CharSequence)v0_1));
                this.a.c.setSelection(v1);
                return;
            }

            if(this.a.c == null) {
                return;
            }

            if(v0 != 0) {
                return;
            }

            if(this.a.r) {
                return;
            }

            if(!AppData.getInstance().getAbSettings().isWebSearchEnable()) {
                this.a.q.setVisibility(View.VISIBLE);
            }

            if(!"detail".equals(this.a.s)) {
                return;
            }

            this.a.q.setTranslationY(UIUtils.dp2px(this.a.a, v6));
            this.a.q.setAlpha(0f);
            this.a.q.animate().translationY(0f).alpha(v5).setDuration(200).setInterpolator(new DecelerateInterpolator()).setStartDelay(v8).start();
        }
    }
}

